##
## Makefile for  in /home/lund/Projets/asm/asm-pixou
## 
## Made by florian dewulf
## Login   <dewulf_f@epitech.net>
## 
## Started on  Mon Mar 25 17:07:55 2013 florian dewulf
## Last update Tue Mar 26 14:21:57 2013 florian dewulf
##

NAME=		libasm.so

SRC_MEMCPY=	memcpy.S
SRC_MEMMOVE=	memmove.S
SRC_RINDEX=	rindex.S
SRC_MEMSET=	memset.S
SRC_STRCASE=	strcasecmp.S
SRC_STRCHR=	strchr.S
SRC_STRCMP=	strcmp.S
SRC_STRLEN=	strlen.S
SRC_STRNCMP=	strncmp.S

OBJ=		memcpy.o	\
		memmove.o	\
		rindex.o	\
		memset.o	\
		strcasecmp.o	\
		strchr.o	\
		strcmp.o	\
		strlen.o	\
		strncmp.o

CFLAGS=		-fPIC

$(NAME):
		nasm -f elf64 $(SRC_MEMCPY)
		nasm -f elf64 $(SRC_MEMMOVE)
		nasm -f elf64 $(SRC_RINDEX)
		nasm -f elf64 $(SRC_MEMSET)
		nasm -f elf64 $(SRC_STRCASE)
		nasm -f elf64 $(SRC_STRCHR)
		nasm -f elf64 $(SRC_STRCMP)
		nasm -f elf64 $(SRC_STRLEN)
		nasm -f elf64 $(SRC_STRNCMP)
		gcc -shared -o $(NAME) $(OBJ)

all:		$(NAME)

clean:
		rm -rf $(OBJ)

fclean:		clean
		rm -rf $(NAME)

re:		fclean all